﻿using Elves;
using Pathfinding;
using Player;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ElvesAttack : ElvesStateBase, IStateBase
{
    ElvesMoveAI moveAI;
    Transform target;

    public ElvesAttack(ElvesBody elves) : base(elves)
    {
        moveAI = new ElvesMoveAI(Elves, Elves.GetComponent<Seeker>());
    }

    public void GetState()
    {
        throw new System.NotImplementedException();
    }

    public void Interrupt()
    {
        throw new System.NotImplementedException();
    }

    public void OnEnter()
    {
        Elves.ElvesStatus.isAttack = true;
        Elves.ElvesStatus.isInCombat = true;
        moveAI.StartPath();
        //throw new System.NotImplementedException();
    }

    public void OnExit()
    {
        Elves.ElvesStatus.isAttack = false;
        Elves.ElvesStatus.isInCombat = false;
        moveAI.EndPath();
        //throw new System.NotImplementedException();
    }

    public void OnFixedUpdate()
    {

        //throw new System.NotImplementedException();
    }

    public void OnUpdate(params object[] obj)
    {
        target = (Transform)obj[0];
        //throw new System.NotImplementedException();
    }

}
